package cn.i7baozh.boot.learn.bean;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 演示手动注册bean
 * @author zhangbaoqi532
 * @date 2025/3/18
 */
@Slf4j
public class MyTestBean2 {

    private String name;

    public MyTestBean2(String name) {
        System.out.println(name);
        this.name = name;
    }
    public void init(){
        System.out.println("！！！ - 初始化" + name);
    }

    public void print(){
        System.out.println("得到的值"+ name);
    }
    public void destroy(){
        System.out.println("！！！ - 销毁" + name);
    }
}
